<template>
  <div>
    <div>
      <div class="name">
        <i class="el-icon-school">{{ hospName }}</i>
        
      </div>
      <br />
      <el-amap :center="center" vid="amapDemo1" class="map">
        <el-amap-marker
          vid="component-marker"
          :position="center"
        ></el-amap-marker>
      </el-amap>
    </div>
  </div>
</template>

<script>
import axios from "../utils/request.js";
export default {
  data() {
    return {
      center: [115.793333, 25.600478],
      hospName: "",
    };
  },
  computed: {},
  methods: {},
  created() {
    //console.log(this.$route.query);
    // 接受其他页面跳转携带的参数
    let { longitude, latitude, name } = this.$route.query;
    this.center = [longitude, latitude];
    this.hospName = name;
  },
  mounted() {},
};
</script>
<style scoped>
.map {
  height: 500px;
}
.name {
  font-size: 25px;
  text-align: center;
}
.name :hover{
  font-size: 30px;
  color:rgb(119, 194, 255);
}
</style>